﻿using OfficeOpenXml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExcelHelper.Models
{
    /// <summary>
    /// 一个模板对应一组
    /// 多组可以向下或向右跨列
    /// </summary>
    public class TemplateParas
    {

        public int GroupRowStart_fromOne { get; set; } = 1;
        public int GroupColStart_fromOne { get; set; } = 1;
        public int GroupRowEnd_fromOne { get; set; } = 11;

        public int GroupColEnd_fromOne { get; set; } = 11;

        /// <summary>
        /// 多组跨列方向
        /// </summary>
        public string? MultiGroupDirection { get; set; } = "向下";

        /// <summary>
        /// 多组跨度
        /// </summary>
        public int MultiGroupStep { get; set; } = 1;


        /// <summary>
        /// 组内跨列方向
        /// </summary>
        public string? MultiItemDirection { get; set; } = "向下";

        /// <summary>
        /// 组内跨度
        /// </summary>
        public int MultiItemStep { get; set; } = 1;

        /// <summary>
        /// 组内跨列数量，<=0 为不限制
        /// </summary>
        public int MultiItemMaxCount { get; set; } = -1;

        /// <summary>
        /// 用于计算items数量的路径(须继承自IEnumerable)
        /// 例如：
        /// class MyClass{
        ///     public int id;{get;set;}
        ///     public int[] items{get;set;} ///items继承IEnumerable
        /// }
        /// 
        /// 则，可用items作为路径
        /// </summary>
        public string? PathForItemsCount { get; set; }


        public List<TemplateReplacingItem> ReplacingItems{get;set;}=new List<TemplateReplacingItem>() { };


        
    }
}
